﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="Ribbon.SocialNetworking" Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Tabs._children">
          <Tab Id="Ribbon.SocialNetworking" Title="Social Activities" Description="Social networking done in SharePoint 2010" Sequence="502">
            <Scaling Id="Ribbon.SocialNetworking.Scaling">
              <MaxSize Id="Ribbon.SocialNetworking.Scaling.Big.MaxSize" GroupId="Ribbon.SocialNetworking.Social" Size="ThreeLarge" Sequence="1"/>
              <MaxSize Id="Ribbon.SocialNetworking.Scaling.ThreeRows.MaxSize" GroupId="Ribbon.SocialNetworking.Bookmark" Size="ThreeRows"/>
              <MaxSize Id="Ribbon.SocialNetworking.Scaling.TwoLarge.MaxSize" GroupId="Ribbon.SocialNetworking.Communication" Size="TwoLarge" Sequence="3"/>
              <Scale Id="Ribbon.SocialNetworking.Scaling.Big.Scale" GroupId="Ribbon.SocialNetworking.Social" Size="ThreeLarge" Sequence="2"/>
              <Scale Id="Ribbon.SocialNetworking.Scaling.ThreeRows.Scale" GroupId="Ribbon.SocialNetworking.Bookmark" Size="ThreeRows"/>
              <Scale Id="Ribbon.SocialNetworking.Scaling.TwoLarge.Scale" GroupId="Ribbon.SocialNetworking.Communication" Size="TwoLarge" Sequence="4"/>
            </Scaling>
            <Groups Id="Ribbon.SocialNetowkring.Groups">
              <Group Id="Ribbon.SocialNetworking.Social" Title="Social Activities" Sequence="52" Template="Ribbon.Templates.ThreeLargeTemplate">
                <Controls Id="Ribbon.SocialNetworking.Social.Controls">
                  <Button Image32by32="/_layouts/images/mossfgimg.png" Image32by32Class="tagsLocation" LabelText="Tags &amp; Notes" Id="Ribbon.SocialNetworking.Social.Controls.TagsButton"
                          Command="Ribbon.SocialNetworking.Tags" Description="Tags help you remember links and classify the page.  Notes are public comments.  Tags and notes post to your news feed and work across different sites."
                          TemplateAlias="btn1"/>
                  <Button Image32by32="/Ribbon/Social%20Networking%20Icons/32px/twitter.png" LabelText="Twitter" Id="Ribbon.SocialNetworking.Social.Controls.TwitterButton"
                          Command="Ribbon.SocialNetworking.Twitter" Description="Tweet this item"
                          TemplateAlias="btn2"/>
                  <Button Image32by32="/Ribbon/Social%20Networking%20Icons/32px/facebook.png" LabelText="Facebook" Id="Ribbon.SocialNetworking.Social.Controls.FacebookButton"
                          Command="Ribbon.SocialNetworking.Facebook" Description="Send to Facebook wall"
                          TemplateAlias="btn3"/>
                </Controls>
              </Group>
              <Group Id="Ribbon.SocialNetworking.Bookmark" Title="Bookmark" Sequence="53" Template="Ribbon.Templates.ThreeRowsThreeColumnsTemplate">
                <Controls Id="Ribbon.SocialNetworking.Bookmark.Controls">
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/microsoft.png" LabelText="Live" Id="Ribbon.SocialNetworking.Bookmark.Controls.LiveButton"
                          Command="Ribbon.SocialNetworking.Live" Description="Bookmark using Live"
                          TemplateAlias="btn4"/>
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/google.png" LabelCss="labelStyle" LabelText="Google" Id="Ribbon.SocialNetworking.Bookmark.Controls.GoogleButton"
                          Command="Ribbon.SocialNetworking.Google" Description="Bookmark using Google"
                          TemplateAlias="btn5"/>
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/reddit.png" LabelCss="labelStyle" LabelText="Reddit" Id="Ribbon.SocialNetworking.Bookmark.Controls.RedditButton"
                          Command="Ribbon.SocialNetworking.Reddit" Description="Bookmark using Reddit"
                          TemplateAlias="btn6"/>
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/technorati.png" LabelText="Technorati" Id="Ribbon.SocialNetworking.Bookmark.Controls.TechnoratiButton"
                          Command="Ribbon.SocialNetworking.Technorati" Description="Bookmark using Technorati"
                          TemplateAlias="btn7"/>
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/linkedin.png" LabelText="Linkedin " Id="Ribbon.SocialNetworking.Bookmark.Controls.LinkedinButton"
                          Command="Ribbon.SocialNetworking.Linkedin" Description="Bookmark using Linkedin"
                          TemplateAlias="btn8"/>
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/delicious.png" LabelText="Del.icio.us" Id="Ribbon.SocialNetworking.Bookmark.Controls.DeliciousButton"
                          Command="Ribbon.SocialNetworking.Delicious" Description="Bookmark using Delicious"
                          TemplateAlias="btn9"/>
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/digg.png" LabelText="Digg It" Id="Ribbon.SocialNetworking.Bookmark.Controls.DiggItButton"
                          Command="Ribbon.SocialNetworking.DiggIt" Description="Bookmark using Digg It"
                          TemplateAlias="btn10"/>
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/stumbleupon.png" LabelText="StumbleUpon " Id="Ribbon.SocialNetworking.Bookmark.Controls.StumbleuponButton"
                          Command="Ribbon.SocialNetworking.Stumbleupon" Description="Bookmark using StumbleUpon"
                          TemplateAlias="btn11"/>
                  <Button Image16by16="/Ribbon/Social%20Networking%20Icons/16px/friendfeed.png" LabelText="FriendFeed" Id="Ribbon.SocialNetworking.Bookmark.Controls.FriendFeedButton"
                          Command="Ribbon.SocialNetworking.FriendFeed" Description="Bookmark using FriendFeed"
                          TemplateAlias="btn12"/>
                </Controls>
              </Group>
              <Group Id="Ribbon.SocialNetworking.Communication" Title="Communication" Sequence="54" Template="Ribbon.Templates.TwoBigTemplate">
                <Controls Id="Ribbon.SocialNetworking.Communication.Controls">
                  <Button Image32by32="/_layouts/images/MenuAlert.gif" LabelText="E-mail a Link" Id="Ribbon.SocialNetworking.Communication.Controls.EmailButton"
                          Command="Ribbon.SocialNetworking.Email" Description="Email a link"
                          TemplateAlias="btn13"/>
                  <Button Image32by32="/_layouts/images/MenuRSS.gif" LabelText="RSS Feed" Id="Ribbon.SocialNetworking.Communication.Controls.RssButton"
                          Command="Ribbon.SocialNetworking.Rss" Description="Get RSS Feed"
                          TemplateAlias="btn14"/>
                </Controls>
              </Group>
            </Groups>
          </Tab>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.ThreeLargeTemplate">
            <Layout Title="ThreeLarge" LayoutTitle="ThreeLarge">
              <Section Alignment="Top" Type="OneRow">
                <Row>
                  <ControlRef TemplateAlias="btn1" DisplayMode="Large" />
                  <ControlRef TemplateAlias="btn2" DisplayMode="Large"/>
                  <ControlRef TemplateAlias="btn3" DisplayMode="Large"/>
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.ThreeRowsThreeColumnsTemplate" ClassName="LabelsWithFixedSize">
            <Layout Title="ThreeRows" LayoutTitle="ThreeRows">
              <Section Alignment="Top" Type="ThreeRow">
                <Row>
                  <ControlRef TemplateAlias="btn4" DisplayMode="Medium"/>
                  <ControlRef TemplateAlias="btn7" DisplayMode="Medium"/>
                  <ControlRef TemplateAlias="btn10" DisplayMode="Medium"/>
                </Row>
                <Row>
                  <ControlRef TemplateAlias="btn5" DisplayMode="Medium"/>
                  <ControlRef TemplateAlias="btn8" DisplayMode="Medium"/>
                  <ControlRef TemplateAlias="btn11" DisplayMode="Medium"/>
                </Row>
                <Row>
                  <ControlRef TemplateAlias="btn6" DisplayMode="Medium"/>
                  <ControlRef TemplateAlias="btn9" DisplayMode="Medium"/>
                  <ControlRef TemplateAlias="btn12" DisplayMode="Medium"/>
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.TwoBigTemplate">
            <Layout Title="TwoLarge" LayoutTitle="TwoLarge">
              <Section Alignment="Top" Type="OneRow">
                <Row>
                  <ControlRef TemplateAlias="btn13" DisplayMode="Large"/>
                  <ControlRef TemplateAlias="btn14" DisplayMode="Large"/>
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Tags" CommandAction="javascript:SendTag()"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Twitter" CommandAction="javascript:SendToTwitter();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Facebook" CommandAction="javascript:SendToFacebook();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Live" CommandAction="javascript:SendToLive();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Google" CommandAction="javascript:SendToGoogle();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Reddit" CommandAction="javascript:SendToReddit();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Technorati" CommandAction="javascript:SendToTechnorati();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Linkedin" CommandAction="javascript:SendToLinkedIn();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Delicious" CommandAction="javascript:SendToDelicious();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.DiggIt" CommandAction="javascript:SendToDiggIt();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Stumbleupon" CommandAction="javascript:SendToStumbleUpon()"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.FriendFeed" CommandAction="javascript:SendToFF()"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Email" CommandAction="javascript:EmailLink();" EnabledScript="javascript:EnableEmailButton();"/>
        <CommandUIHandler Command="Ribbon.SocialNetworking.Rss" CommandAction="javascript:GetRSSFeed();" EnabledScript="javascript:EnableRSSButton();"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
  Id="Ribbon.SocialNetworking.Email.Script"
  Location="ScriptLink"
  ScriptSrc ="/_layouts/SharePointSocialNetworking/SharePointSocialNetworkingHandler.js"/>
</Elements>
